package com.koron.car.web.carledger.bean.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.koron.car.web.common.DeleteFlag;
import com.koron.car.web.common.UpdateParameter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@ApiModel("车辆台账")
public class Car implements Serializable, DeleteFlag, UpdateParameter {

    private static final long serialVersionUID = 319116671646180661L;

    @ApiModelProperty("id，主键")
    private String id;

    @ApiModelProperty("车牌号")
    private String licPlateNum;

    @ApiModelProperty("车架")
    private String frame;

    @ApiModelProperty("车辆品牌")
    private String brand;

    @ApiModelProperty("车型，字典(car_models)")
    private String model;

    @ApiModelProperty("座位数")
    private Integer seat;

    @ApiModelProperty("排气量，保留两位小数，单位L")
    private Double displacement;

    @ApiModelProperty("车辆颜色")
    private String color;

    @ApiModelProperty("载重，保留两位小数，单位KG")
    private Double load;

    @ApiModelProperty("供应商")
    private String supplier;

    @ApiModelProperty("购车日期")
    @DateTimeFormat(pattern = "yyyy-MM")
    @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
    private Date purchaseDate;

    @ApiModelProperty("购置价格，保留两位小数，单位万元")
    private Double purchasePrice;

    @ApiModelProperty("审有效期，格式：yyyy-MM-dd")
    private Date reviewDate;

    @ApiModelProperty("编制类型，字典(prepare_type)：经营管理、业务保障、未定编")
    private String prepareType;

    @ApiModelProperty("定编号")
    private String prepareNumber;

    @ApiModelProperty("ETC卡编号")
    private String etc;

    @ApiModelProperty("归属组织，使用单位")
    private String ownerOrg;

    @ApiModelProperty("所属车队，所属车队id(新建即保存或新增)")
    private String motorcade;

    @ApiModelProperty("车队名称")
    private String motorcadeName;

    @ApiModelProperty("车管员")
    private String carController;

    @ApiModelProperty("车管员名字")
    private String carControllerName;

    @ApiModelProperty("年度行驶距离")
    private Double yearDistance;

    @ApiModelProperty("累计行驶距离，结束用车后更新，单位：公里")
    private Double totalDistance;

    @ApiModelProperty("状态，字典(car_state)：留用、空闲、出车、借出、维修、废弃、草稿")
    private String state;

    @ApiModelProperty(value = "创建人账号")
    private String createBy;

    @ApiModelProperty(value = "创建人姓名")
    private String createByName;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新人账号")
    private String updateBy;

    @ApiModelProperty(value = "更新人姓名")
    private String updateByName;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "部门")
    private String deptId;

    @JsonIgnore
    @ApiModelProperty(value = "删除标志", hidden = true)
    private Boolean deleteFlag;
}
